package cn.itcast.user.fallback;

import cn.itcast.user.client.UserClient;
import cn.itcast.user.pojo.User;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
public class UserClientFallBack implements UserClient {


    @Override
    public User queryById(Long id) {

        User  user = new User();

        user.setId(id);

        user.setName("用户查询异常");

        return user;
    }
}
